﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcEngine.LinqToSqlProvider;
using MvcEngine.Blog.Models.Entities;
using System.Data.Linq;
using MvcEngine.Core.Helpers;

namespace MvcEngine.Blog.LinqToSqlProvider
{
    public static class BlogDataContextExtensions
    {
        public static Table<BlogData> Blogs(this DataContext context)
        {
            return context.GetTable<BlogData>();
        }

        public static Table<BlogPost> Posts(this DataContext context)
        {
            return context.GetTable<BlogPost>();
        }

        public static Table<BlogCategory> Categories(this DataContext context)
        {
            return context.GetTable<BlogCategory>();
        }

        public static Table<BlogPostCategory> PostCategories(this DataContext context)
        {
            return context.GetTable<BlogPostCategory>();
        }

        public static Table<BlogTagBase> Tags(this DataContext context)
        {
            return context.GetTable<BlogTagBase>();
        }

        public static Table<BlogPostTag> PostTags(this DataContext context)
        {
            return context.GetTable<BlogPostTag>();
        }

        public static Table<BlogPostComment> Comments(this DataContext context)
        {
            return context.GetTable<BlogPostComment>();
        }

        public static Table<BlogPostNotify> Notifies(this DataContext context)
        {
            return context.GetTable<BlogPostNotify>();
        }
    }
}
